package com.xuzimian.globaldemo.designpatterns.proxy.dynamic.performance.handler;

import javassist.util.proxy.MethodHandler;

import java.lang.reflect.Method;

public class JavassistHandler implements MethodHandler {
	private Object target;

	public JavassistHandler(Object target) {
		this.target = target;
	}

	@Override
	public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
		Object result = thisMethod.invoke(target, args);

		return result;
	}
}
